package entities;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="chestionare")
@NamedQueries({
	@NamedQuery(name="getToateChestionarele", query="SELECT c FROM Chestionare c"),
	@NamedQuery(name="dupaCategorie", query="SELECT c FROM Chestionare c WHERE c.categorie=:cat_Param"),
	@NamedQuery(name="dupaSubCategorie", query="SELECT c FROM Chestionare c WHERE c.subcategorie=:subcat_Param"),
	@NamedQuery(name="dupaScop", query="SELECT c FROM Chestionare c WHERE c.scop=:scop_Param"),
	@NamedQuery(name="dupaActiv", query="SELECT c FROM Chestionare c WHERE c.activ=:activ_Param")
})
public class Chestionare implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	private int id;
	
	private String nume;
	
	private String scop;
	
	private String categorie;
	
	private String subcategorie;
	
	private int activ;
	
	@OneToMany (mappedBy="chestionare")
    private List<Intrebari> intrebari;

	
	public Chestionare(){
		super();
	}
	
	public Chestionare(int id, String nume, String scop, String categorie, String subcategorie, int activ){
		this.id = id;
		this.nume = nume;
		this.scop = scop;
		this.categorie = categorie;
		this.subcategorie = subcategorie;
		this.activ = activ;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getNume() {
		return nume;
	}

	public void setNume(String nume) {
		this.nume = nume;
	}

	public String getScop() {
		return scop;
	}

	public void setScop(String scop) {
		this.scop = scop;
	}

	public String getCategorie() {
		return categorie;
	}

	public void setCategorie(String categorie) {
		this.categorie = categorie;
	}

	public String getSubcategorie() {
		return subcategorie;
	}

	public void setSubcategorie(String subcategorie) {
		this.subcategorie = subcategorie;
	}

	public int getActiv() {
		return activ;
	}

	public void setActiv(int activ) {
		this.activ = activ;
	}

	public List<Intrebari> getIntrebari() {
		return intrebari;
	}

	public void setIntrebari(List<Intrebari> intrebari) {
		this.intrebari = intrebari;
	}

}
